<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>当前流通</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {

		});

		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
<form:form id="searchForm" modelAttribute="borrow" action="${ctx}/book/borrowed/currentcirculationlist" method="post" class="breadcrumb form-search ">
	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
	<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
	<%--<ul class="ul-form">--%>
		<%--<li><label>借书证号：</label>--%>
			<%--<form:input path="rdCardno" htmlEscape="false" maxlength="50" class="input-medium"/>--%>
		<%--</li>--%>
		<%--<li><label>图书条码号：</label>--%>
			<%--<form:input path="bkId" htmlEscape="false" maxlength="50" class="input-medium"/>--%>
		<%--</li>--%>
		<%--<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="return page();"/>--%>
		<%--<li class="clearfix"></li>--%>
	<%--</ul>--%>
		<div class="controls">
			<label class="control-label">查询条件:</label>
			<form:select path="searchCondition" class="input-medium">
				<form:options items="${fns:getDictList('bk_currentcirculation_search')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
			</form:select>
			&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
		</div>

</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
	<thead>
	<tr>
		<th>借书证号</th>
		<th>读者姓名</th>
		<th>联系电话</th>
		<th>图书条码</th>
		<th>资料名称</th>
		<th>ISBN</th>
		<th>借出日期</th>
		<th>应还日期</th>
		<th>归还日期</th>
		<th>续借次数</th>
		<th>操作</th>
	</thead>
	<tbody>
	<c:forEach items="${page.list}" var="borrowlist">
		<tr>
			<td>${borrowlist.reader.rdCardno}</td>
			<td>${borrowlist.reader.rdName}</td>
			<td>${borrowlist.reader.rdTele}</td>
			<td>${borrowlist.bkBookstore.banid}</td>
			<td>${borrowlist.bkBookinfo.bookname}<c:if test="${not empty borrowlist.bkBookinfo.othername}">-${borrowlist.bkBookinfo.othername}</c:if></td>
			<td>${borrowlist.bkBookinfo.isbn}</td>
			<td><fmt:formatDate value="${borrowlist.borDate}" pattern="yyyy-MM-dd"/></td>
			<td><fmt:formatDate value="${borrowlist.needRtnDate}" pattern="yyyy-MM-dd"/></td>
			<td><fmt:formatDate value="${borrowlist.rtnDate}" pattern="yyyy-MM-dd"/></td>
			<td>${borrowlist.contCnt}</td>
			<td>
				<c:choose>
					<c:when test="${borrowlist.status== '1'}">
						<a href="${ctx}/book/borrowed/rtnbook?bookIds=${borrowlist.zlId}">归还</a>
						<%--<a href="${ctx}/book/borrowed/brcontinue?id=${borrowlist.zlId}">续借</a>--%>
					</c:when>
					<c:otherwise>
						--
					</c:otherwise>
				</c:choose>

			</td>
		</tr>
	</c:forEach>
	</tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>